//
//  Ltq_imageViewButton.m
//  UI03_homework
//
//  Created by Hanlingyu on 16/7/18.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "Ltq_imageViewButton.h"

@implementation Ltq_imageViewButton


- (instancetype)initWithFrame:(CGRect)frame addImage:(nullable UIImage *)addImage addTarget:(nonnull id)target action:(nonnull SEL)clickAction {
    self = [super initWithFrame:frame];
    if (self) {
        self.userInteractionEnabled = YES;
        _backgroundColor = backgroundColor;
        _addImage = addImage;
        _target = target;
        _acton = clickAction;
        
        [self createView];
    }
    
    return self;

}


- (void)createView {

    self.image = _addImage;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self.target action:self.acton];
    [self addGestureRecognizer:tap];



}

- (void)addImage:(UIImage *)image {

    self.image = image;

}

- ()




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
